package com.miyake.dsp.otdr.trial;

import java.util.ArrayList;
import java.util.List;

public class Composite {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Composite root = new Composite("root");
		root.add(new Composite("child1"));
		root.add(new Composite("child2"));
	}

	private List<Composite> list = new ArrayList<Composite>();
	private String name;
	private Object client;

	public Composite(String name) {
		this.name = name;
	}
	
	public void add(Composite c) {
		list.add(c);
	}
	
	public void addClient(Object c) {
		this.client = c;
	}
	public Object getClient() {
		return client;
	}

	public List<Composite> getList() {
		return list;
	}

	public void setList(List<Composite> list) {
		this.list = list;
	}
	
}
